package cn.wolfcode.crm.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Getter
@Setter
//职工信息
@JsonIgnoreProperties(value={"handler"})
public class Staff extends BaseDomain{
    public static final int STATE_NORMAL = 0;   //在职
    public static final int STATE_QUIT = 1; //离职

    private String username;    //职工姓名

    private Department dept;   //所属部门

    private DictionaryItem gender; //性别

    private Integer age;    //年龄

    private DictionaryItem studyeffort;    //学历

    private String family;  //祖籍

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date borndate;  //出生年月日

    private DictionaryItem political;  //政治面貌

    private String tel; //手机号

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date hiredate;  //入职日期

    private Double seniroity;   //工龄

    private DictionaryItem marriage;   //婚姻状况

    private Integer state = STATE_NORMAL;  //在职/离职

    private boolean admin;  //是否是超级管理员

    private DictionaryItem duty;   //职务

    private DictionaryItem hiretype;   //聘用类型

    private String timecard;    //考勤卡号

    private String password;    //密码

    private String idcard;  //身份证号

    private String portrait;    //头像

    private String jobnumber;   //工号

}